/**
 * 文件登陆相关接口
 */
import request from '@/utils/request.js'


export const upload = (file) => {
  return request({
    url: '/file/upload',
    method: 'POST',
    data: {
      file
    },
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
}

export const download = (url) => {
  return request({
    url: '/file/download',
    method: 'POST',
    data: {
      url
    },
    responseType: 'blob'
  })
}